package com.neutech.service.impl;
import com.neutech.mapper.DoctorMapper;
import com.neutech.mapper.ListMapper;
import com.neutech.service.ListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class ListServiceImpl implements ListService {
    @Autowired
    private ListMapper listMapper;
    @Override
    public List<Map<String, Object>> queryList() {
        List<Map<String, Object>> list = listMapper.queryListList(0);
        return list;
    }
    @Override
    public void insertList(Map map){
        Integer a = listMapper.addList(map);
    }
    public void updataList(Map map){
        listMapper.updataListById(map);
    }
    @Override
    public void deleteList(Map map){
        // doctorMapper.delDoctorById(map);
//        System.out.println(map.get("docid"));
//        System.out.println("kanzheli");
        Integer rid= Integer.valueOf(map.get("rid").toString());
        listMapper.delListById(rid);
    }
}
